Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scatter): 散点图刷选交互之后的 scale 处理 #2649

Merged
merged 3 commits into from
Jun 28, 2021
Merged

Conversation

visiky
Copy link
Member

@visiky visiky commented Jun 19, 2021

PR includes

Screenshot

Before After
image 单一数据点 image
image 等 y 轴数值 image
image 等 x 轴数值 image

@visiky visiky requested a review from hustcc June 19, 2021 15:54
@github-actions
Copy link
Contributor

github-actions bot commented Jun 19, 2021

🎊 PR Preview d0de0df has been successfully built and deployed to https://antvis-G2Plot-preview-pr-2649.surge.sh?type=diff&date=2021-06-22

🕐 Build time: 81.216s

🤖 By surge-preview

@visiky visiky changed the title fix(scatter): 散点图刷选交互之后的 scale 处理 wip: fix(scatter): 散点图刷选交互之后的 scale 处理 Jun 19, 2021
@coveralls
Copy link

coveralls commented Jun 22, 2021

Pull Request Test Coverage Report for Build 960795950

  • 23 of 25 (92.0%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 95.938%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/plots/scatter/index.ts 4 6 66.67%
Files with Coverage Reduction New Missed Lines %
src/plots/scatter/adaptor.ts 1 93.6%
src/plots/scatter/index.ts 1 83.33%
Totals Coverage Status
Change from base Build 942591733: -0.04%
Covered Lines: 6036
Relevant Lines: 6135

💛 - Coveralls

@visiky visiky changed the title wip: fix(scatter): 散点图刷选交互之后的 scale 处理 fix(scatter): 散点图刷选交互之后的 scale 处理 Jun 22, 2021
@visiky visiky merged commit 17e8f08 into master Jun 28, 2021
@visiky visiky deleted the fix-2507 branch June 28, 2021 11:48
const maxX = max(xValues);
const yValues = data.map((d) => d[yField]);
const minY = min(yValues);
const maxY = max(yValues);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里要做性能提升。其实只需要判断 isSameXValue,isSameYValue。

meta({ chart, options });
}
});
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以放到 changeData 函数中,用 this.once 更节省。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

散点图 刷选交互 刷选后的个别点会显示在轴上,影响视觉效果
3 participants